project(naptd)

set(NAPTD_SOURCE
        alg.cc
        arp_handler.cc
        ataga.cc
        dns_helper.cc
        log.cc
        nat-mngr.cc
        ndisc.cc
        settings.cc
        v4_handler.cc
        v6_handler.cc)

set(NAPTD_CONFMAKER_SOURCE
        conf_maker.cc
        settings.cc)

set(CPPFLAGS -O3)

## ataga
add_executable(${PROJECT_NAME} ${NAPTD_SOURCE})
target_compile_options(${PROJECT_NAME} PRIVATE ${CPPFLAGS})
target_link_libraries(${PROJECT_NAME} PRIVATE pthread dl)

## ataga-confmaker
add_executable(${PROJECT_NAME}-confmaker ${NAPTD_CONFMAKER_SOURCE})
target_compile_options(${PROJECT_NAME}-confmaker PRIVATE ${CPPFLAGS})

## plugins

### ftp_plugin
add_alg_plugin(ftp
        SOURCES
        alg_ftp.cc
        COMPILE_FLAGS
        ${CPPFLAGS})

### dns_plugin
add_alg_plugin(dns
        SOURCES
        alg_dns.cc
        COMPILE_FLAGS
        ${CPPFLAGS})
